package com.jfplugin.xsql.core;

import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;

/**
 * Context
 * @author farmer
 *
 */
public class Context {

	public Object globalVar = new Object();
	
	public StringWriter sw = new StringWriter();
	
	/**
	 * List形式
	 */
	public List<Object> args = new ArrayList<Object>();
	
	/**
	 * 获取数组
	 * @return
	 * 	预编译参数
	 */
	public Object[] getArgsArray(){
		return args.toArray();
	}
	
	/**
	 * 获取List
	 * @return
	 * 	预编译参数
	 */
	public List<Object> getArgs(){
		return args;
	}
	
	@Override
	public String toString(){
		return sw.toString();
	}
	
}
